<?php

namespace App\Http\Controllers\Api\V1;

use Illuminate\Http\Request;
use App\Http\Requests\Api\V1\ReplyRequest;

use App\Models\Article;
use App\Models\ArticleReply;

class ArticleRepliesController extends Controller
{
    public function store(ReplyRequest $request, Article $article, ArticleReply $reply)
    {
        $reply->content = $request->content;
        $reply->article()->associate($article);
        $reply->user()->associate($request->user());
        $reply->save();

        return response(null, 201);
    }
}
